import '../core/api_response.dart';
import '../models/user.dart';
import '../models/auth_token.dart';
import '../models/login_request.dart';

abstract class AuthRepository {
  // 认证相关
  Future<ApiResponse<LoginResponse>> login(LoginRequest request);
  Future<ApiResponse<User>> register(RegisterRequest request);
  Future<ApiResponse<void>> logout();
  Future<ApiResponse<void>> forgotPassword(ForgotPasswordRequest request);
  
  // Token 管理
  Future<ApiResponse<AuthToken>> refreshToken(String refreshToken);
  Future<AuthToken?> getStoredToken();
  Future<void> saveToken(AuthToken token);
  Future<void> clearToken();
  
  // 用户信息
  Future<ApiResponse<User>> getProfile();
  Future<ApiResponse<User>> updateProfile(User user);
  Future<User?> getStoredUser();
  Future<void> saveUser(User user);
  Future<void> clearUser();
  
  // 状态检查
  Future<bool> isLoggedIn();
  Future<bool> hasValidToken();
}